<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

Route::any('/sentCmd', 'ApiCommandController@sentCmd');// 发送命令
Route::any('/controlAll', 'ApiCommandController@controlAll');// 控制所有
Route::any('/getItemDevices', 'ApiCommandController@getItemDevices');// 展项电源开关

Route::any('/getDevices', 'ApiCommandController@getDevices');// 所有电源开关
Route::any('/getHosts', 'ApiCommandController@getHosts');// 所有主机信息
Route::any('/hostShutdown', 'ApiCommandController@hostShutdown');// 发送命令
Route::any('/checkHost', 'ApiCommandController@checkHost');// 发送命令
Route::any('/updateHost', 'ApiCommandController@updateHost');// 发送命令

// H5
// login
Route::any('/login_m', 'ApiH5Controller@login_m');// 发送命令
Route::group(['middleware'=>'mt'],function() {
	Route::any('/index_m', 'ApiH5Controller@index_m');// 发送命令	
});







